package com.frontop.system.modules.attendance.workover.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.frontop.system.modules.attendance.workover.model.AttendanceWorkOver;
import com.baomidou.mybatisplus.extension.service.IService;
import com.frontop.system.modules.attendance.workover.vo.AttendanceWorkOverVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 考勤-加班记录表 服务类
 * </p>
 *
 * @author YangJia
 * @since 2022-01-11
 */
public interface AttendanceWorkOverService extends IService<AttendanceWorkOver> {

    Integer addAttendanceWorkOver(List<JSONObject> dates, String userName);

    /**
     * 返回所以加班记录 SQL判断每个日期的状态
     * @param userName
     * @return
     */
    List<JSONObject> getAllWorkOverByUserName(String userName);

    Integer addAttendanceWorkOverByExcel(MultipartFile multipartFile,String userName);


    Page<AttendanceWorkOver> selectAttendanceWorkOverPage(Page<AttendanceWorkOver> page, @Param("param") AttendanceWorkOverVO vo);

    Page<AttendanceWorkOver> selectWorkeOverAbnormal(Page<AttendanceWorkOver> page, @Param("param") AttendanceWorkOverVO vo);


    Integer updateStatus(Integer id);

    JSONObject selectWorkeOverStatistics(Map<String,Object> map);
}